home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
-
- #include "wlib.h"
- #include "winop.h"
-
- #include <HS_wlib.h> /* 1992 by H.Ogasawara(COR.) */
- #include "IconMan.nh"
-
- WindowID
- IconifyOperation( wp, h, v, exec )
- WindowID wp;
- int h, v;
- int (*exec)();
- {
- int x, y;
- WindowID iconwp;
- IconMan *cp;
- int attr= HS_WindowGetAttr(wp); /* 1992 COR.*/
-
- WindowGetPosition( wp, &x, &y );
- if( cp= WindowGetCommon( "IconMan", 0 ) ){
- (*cp->exec)( wp );
- }
- WindowSetAttr( wp, WindowAttrInvisible );
- iconwp= WindowSimpleOpen( x, y, h, v, NULL, exec );
- WindowSetClientData( iconwp, attr, wp );
- WindowRedraw( iconwp );
- return iconwp;
- }
-
- void
- IconMouseOperation( wp, info )
- WindowID wp;
- EventInfo *info;
- {
- if( info->LeftStat && info->MoveFlag ){
- WindowMoveOperation( wp, info );
- }else if( info->LeftOFF ){
- int x, y;
- WindowID parent;
-
- WindowGetPosition( wp, &x, &y );
- parent= WindowGetClientPointer( wp );
- WindowClose( wp );
- WindowMove( parent, x, y );
- WindowSetAttr( parent, WindowGetClientData( wp ) );
- }
- }
-